<?php include load_tpl('header');?>
<p id="breadcrumbs">
    <a href="/">首页</a> <b>»</b> 
    <span>留言列表</span>
</p>

<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background-image: url('./images/product.png');">留言列表</h1>
  </div>
  <div class="content">
	 <form id="form" enctype="multipart/form-data" method="post" action="">
      <table class="list">
        <thead>
          <tr style="background-color: rgb(244, 244, 248);">
            <td width="1" style="text-align: center;"><input type="checkbox" onclick="$('input[name*=\'selected\']').attr('checked', this.checked);"></td>
            <td class="center">姓名</td>
            <td class="left">电话</td>
            <td class="left">E-mail</td>
            <td class="left">QQ/MSN</td>
            <td class="right">留言内容</td>
            <td class="left">留言时间</td>
            <td class="right">操作</td>
          </tr>
        </thead>
        <tbody>
		<?php if($msg_list){
				foreach($msg_list as $msg){
		?>
		<tr>
            <td style="text-align: center;"> <input type="checkbox" value="42" name="selected[]">
              </td>
            <td class="center"><?php echo $msg['name'];?></td>
            <td class="left"><?php echo $msg['telphone'];?></td>
            <td class="left"><?php echo $msg['email'];?></td>
            <td class="left"><?php echo $msg['qq'];?></td>
            <td class="right"><?php echo substr($msg['content'],0,30);?></td>
            <td class="left"><?php echo $msg['created'];?></td>
            <td class="right"><a class="button" href="index.php?mod=about&act=view_msg&msg_id=<?php echo $msg['id'];?>"><span>查看详细</span></a>
			<a class="button" href="index.php?mod=about&act=del_msg&msg_id=<?php echo $msg['id'];?>"><span>删除</span></a>
             </td>
          </tr>
		  <?php
				}
		  }else{
		?>
		<tr>
		<td colspan="8" style="height:26px;">没有任何留言！</td>
        </tr>
		<?php } ?>
	 </tbody>
	 </table>
	 </form>
	 <div class="pages" id="pages"><?php if(isset($pages)) echo $pages;?></div>
  </div>
</div>

<?php include load_tpl('footer');?>